home *** CD-ROM | disk | FTP | other *** search
- #if defined (NMSC)
-
- /* Non-MSC Version */
-
- #if (defined(M_I86CM) || defined(M_I86LM) || defined(M_I86HM))
-
- /* NOTE: These procedures should only be used for
- large data model programs (i.e., Compact, Large, Huge) */
-
- #include <stddef.h>
- #include "alloc.h"
-
- void *calloc ( n, nbytes )
-
- size_t n ; /* Number of units of size nbytes */
- size_t nbytes ; /* Number of bytes to allocate */
-
- /*
- +------------------------------------------+
- | |
- | Memory allocation with initialization |
- | |
- +------------------------------------------+
- */
-
- {
- void *malloc () ;
- void *block ;
- long bsize ;
-
- if ((bsize = (long) n * (long) nbytes) > (long) MAXALLOC )
- return ( NULL ) ;
- if ((block = malloc ( (size_t) bsize )) != NULL )
- memset ( (char *) block, 0, (size_t) bsize ) ;
- return ( block ) ;
- }
- #endif
- #endif
-